<template>
   <swiper :style="{height: height}" class="carousel" autoplay indicator-dots circular>
    <!-- 3. 列表渲染, 插值显示 -->
    <swiper-item v-for="item in banners" :key="item.id" >
      <image :src="item.imgUrl" />
    </swiper-item>
  </swiper>
</template>

<script setup>
defineProps(['banners','height'])
</script>

<style scoped>
.carousel {
  height: 100%;
}
</style>